<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,minimum-scale=1.0">
    <title>漠河智慧社区</title>
    <link href="Content/wechat/css/reset.css" rel="stylesheet" type="text/css">
    <!--  <link href="css/index.css" rel="stylesheet" type="text/css">-->
    <link href="Content/wechat/css/zongZhi_ZXWD.css" rel="stylesheet" type="text/css">
    <script src="Content/wechat/js/jquery.min.js"></script>
    <!--字体缩放-->
    <script src="Content/wechat/js/ziti.js"></script>
    <!--end 字体缩放-->
    <!--页码js-->
    <script src="Content/wechat/js/myPagination.js"></script>
    <!--页码-->
    <link href="Content/wechat/css/myPagination.css" rel="stylesheet" type="text/css">
</head>
<body>
<header >
    <img src="Content/wechat/images/zxwd.jpg">
</header>
<div class="zixun_btn clearfix">
    <div class="zixun_btn_l">
        <p>你好！现在是上班时间，有问题可以直接咨询，我们将在24小时内反馈结果。</p>
    </div>
    <div class="zixun_btn_r">
        <div class="btn" onclick=window.location="/wechat/home/lawmanage/zxzx/lawmanage_ZXWD_FB"><img src="Content/wechat/images/zx_btn.png"></div>
    </div>
</div>
<div class="liuYan">
    <h6>
        <img style="width: 100%" src="Content/wechat/images/wdwt.png">
    </h6>
    <div class="liuYan_box" id="liuYan_box11">
        <div class="liuYan_box_1">
            <div class="neiRong_c" >
                <h4>漠河是大兴安岭地区县级市</h4>
                <span>回复:</span>
                <p>近期计划去漠河旅游，我打算带上我一家人（四大一小）去玩玩，问下去玩几天比较合适，请问去过的要怎么样玩比较省心省钱少走弯路</p>
            </div>
        </div>
    </div>
    <div id="pagination" class="pagination"></div>
</div>
<div class="liuYan">
    <h6>
        <img style="width: 100%" src="Content/wechat/images/wenti.png">
    </h6>
    <div class="liuYan_box"  id="liuYan_box12">
        <div class="liuYan_box_1">
            <div class="name_up clearfix">
                <img src="Content/wechat/images/header.jpg">
                <p>Hello</p>
                <span class="v"></span>
                <u>2019-12-02</u>
            </div>
            <div class="neiRong_c" >
                <h4>漠河是大兴安岭地区县级市</h4>
                <span>回复:</span>
                <p>近期计划去漠河旅游，我打算带上我一家人（四大一小）去玩玩，问下去玩几天比较合适，请问去过的要怎么样玩比较省心省钱少走弯路</p>
            </div>
        </div>

    </div>
    <div id="pagination2" class="pagination"></div>
</div>
</body>
<script>
    window.onload = function () {
        InitAjax(1);
        InitAjax2(1);
    }


</script>
<script>
    var pageTotal = 0;   //总页数
    var pageSize = 2;    //一页显示几个


    function onLoadPaging() {
        new myPagination({
            id: 'pagination',
            curPage: 1, //初始页码
            pageTotal: pageTotal, //总页数
            pageAmount: pageSize,  //每页多少条
            pageSize: 2, //可选,分页个数

            getPage: function (page) {
                //获取当前页数
                InitAjax(page)
            }
        })
    }

    function InitAjax(pageNum) {
        $.ajax({
            url: "/wechat/home/lawmanage/zxzx/myWenda",
            type: 'post',
            dataType: 'json',
            data: {
                pagination: "{page:\"" + pageNum + "\",rows:\"" + pageSize + "\",sidx:\"date desc\",sord:\"\"}",
                type: "kefu"
            }, success: function (result) {
                ajaxCallBack(result);
            }

        })
    }

    function ajaxCallBack(data) {
        var insetViewData = ""; //视图数据
        $.each(data.data.rows, function (index, items) {
            var content = items.content;
            if(content=="" || content==null){
                content="暂未回复";
            }
            insetViewData += "<div class=\"liuYan_box_1\">\n" +
                "            <div class=\"neiRong_c\" >\n" +
                "                <h4>"+items.tcontent+"</h4>\n" +
                "                <span>回复:</span>\n" +
                "                <div class=\"UEditorContent\">"+content+"</div>\n" +
                "            </div>\n" +
                "        </div>";

        });
        $("#liuYan_box11").html(insetViewData);
        if (pageTotal == 0) {
            pageTotal = data.data.total;
            onLoadPaging()
        }
    }


</script>
<script>
    var pageTotal2 = 0;   //总页数
    var pageSize2 = 5;    //一页显示几个


    function onLoadPaging2() {
        new myPagination({
            id: 'pagination2',
            curPage: 1, //初始页码
            pageTotal: pageTotal2, //总页数
            pageAmount: pageSize2,  //每页多少条
            pageSize: 5, //可选,分页个数

            getPage: function (page) {
                //获取当前页数
                InitAjax2(page)
            }
        })
    }

    function InitAjax2(pageNum2) {
        $.ajax({
            url: "/wechat/home/lawmanage/zxzx/allWenda",
            type: 'post',
            dataType: 'json',
            data: {
                pagination: "{page:\"" + pageNum2 + "\",rows:\"" + pageSize2 + "\",sidx:\"date desc\",sord:\"\"}",
                type: "kefu"
            }, success: function (result) {
                ajaxCallBack2(result);
            }

        })
    }

    function ajaxCallBack2(data) {
        var insetViewData2 = ""; //视图数据
        $.each(data.data.rows, function (index, items) {
            var content = items.content;
            if(content=="" || content==null){
                content="暂未回复";
            }
            insetViewData2 += "<div class=\"liuYan_box_1\" >\n" +
                "            <div class=\"name_up clearfix\">\n" +
                "                <img src=\""+items.headimgurl+"\" onerror=src=\"Content/wechat/images/header.jpg\">\n" +
                "                <p>"+items.tname+"</p>\n" +
                "                <span class=\"v\"></span>\n" +
                "                <u>"+items.date.substring(0,10)+"</u>\n" +
                "            </div>\n" +
                "            <div class=\"neiRong_c\" >\n" +
                "                <h4>"+items.tcontent+"</h4>\n" +
                "                <span>回复:</span>\n" +
                "                <p>"+content+"</p>\n" ;


            if(items.imgurl == "" || items.imgurl ==null){

            }else {
                insetViewData2 += "                <p><img src=\"" + items.imgurl + "\" onerror=src=\"Content/wechat/images/timg.jpg\"></p>\n";
            }

            insetViewData2 +=   "            </div>\n" +
                "        </div>";

        });
        $("#liuYan_box12").html(insetViewData2);
        if (pageTotal2 == 0) {
            pageTotal2 = data.data.total;
            onLoadPaging2()
        }
    }


</script>
</html>